import requests

from bs4 import BeautifulSoup


def sign():
    # 登录及签到post数据准备

    s = requests.session()

    log_data = {'Phone': '*******', 'Password': '*******'}

    sgn_data = {'opt': 'user_sign','lpqazplsion':'oqsd2joVGSopwlRgd6WPaKPa7qwY'}

    # 登录操作

    #log = s.post('http://www.***.com', log_data)
    #log = s.post('http://www.***.com', log_data)

    html = s.get('http://www.sxydwx.cn/wechat/JxHomePageQiandaoServlet?opt=qiandao&lpqazplsion=oqsd2joVGSopwlRgd6WPaKPa7qwY')

    # 签到操作

    rsq = s.post('http://www.sxydwx.cn/wechat/JxHomePageQiandaoServlet', sgn_data)
    print(rsq.text);
    # 提取签到结果并打印

    page = s.get('http://www.sxydwx.cn/wechat/JxHomePageQiandaoServlet?opt=qiandao&lpqazplsion=oqsd2joVGSopwlRgd6WPaKPa7qwY').content

    soup = BeautifulSoup(page, "html.parser")



sign()